<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <form class="well form-inline" method="post" action="">
        <div class="panel panel-info">
            <div class="panel-heading">管理规格</div>
            <table class="table table-hover">
                <tbody id="itemBox">
                <tr>
                    <td>
                        <label>
                            牌照：
                            <input class="form-control" type="text" name="wuliutuoyun_car[]" placeholder="请输入牌照">
                        </label>
                    </td>
                    <td>
                        <label>
                            托运货物：
                            <input class="form-control" type="text" name="wuliutuoyun_goods[]" placeholder="请输入托运货物">
                        </label>
                    </td>
                    <td>
                        <label>
                            联系人：
                            <input class="form-control" type="text" name="wuliutuoyun_username[]"
                                   placeholder="请输入联系人">
                        </label>
                    </td>

                    <td>
                        <label>
                            联系电话：
                            <input class="form-control" type="text" name="wuliutuoyun_tel[]" placeholder="请输入联系电话">
                        </label>
                    </td>
                    <td>
                    </td>
                </tr>
                </tbody>
            </table>

            <div>
                <button id="addbtn" type="button" class="btn btn-info pull-right ">新增</button>
                <button type="submit" class="btn btn-info">确认提交</button>
            </div>
        </div>


        <script>
            var itemGroup = `<tr>
                    <td>
                        <label>
                            牌照：
                            <input class="form-control" type="text" name="wuliutuoyun_car[]" placeholder="请输入牌照">
                        </label>
                    </td>
                    <td>
                        <label>
                            托运货物：
                            <input class="form-control" type="text" name="wuliutuoyun_goods[]" placeholder="请输入托运货物">
                        </label>
                    </td>
                    <td>
                        <label>
                            联系人：
                            <input class="form-control" type="text" name="wuliutuoyun_username[]"
                                   placeholder="请输入联系人">
                        </label>
                    </td>

                    <td>
                        <label>
                            联系电话：
                            <input class="form-control" type="text" name="wuliutuoyun_tel[]" placeholder="请输入联系电话">
                        </label>
                    </td>
                    <td>
                        <button type="button" class="btn btn-danger delbtn">删除</button>
                    </td>
                </tr>`;
            /*增加组*/
            $('#addbtn').click(function () {
                $('#itemBox').append(itemGroup);
            })

            $('#itemBox').on('click', '.delbtn', function () {
                $(this).parents("tr").remove();
            });
        </script>
    </form>

</div>

<script src="__STATIC__/js/admin.js"></script>
</body>
</html>